package com.lancoo.cvas.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lancoo.cvas.entity.RuleCourse;
import com.lancoo.cvas.entity.RuleCourseProhibit;
import com.lancoo.cvas.pojo.dto.CourseProhibitDto;
import com.lancoo.cvas.pojo.vo.*;
import com.lancoo.cvas.util.Result;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 课程禁排
 *
 * @author liufeng
 * @email 1037383243@qq.com
 * @date 2023-12-04 11:54:00
 */
public interface RuleCourseProhibitService extends IService<RuleCourseProhibit> {


    RuleCourseProhibitVo getRuleProhibit(Integer taskId, Long ruleId);

//    RuleCourseProhibitVo getCourseProhibit(Integer taskId, Long courseId);

    boolean setCourseProhibit(Integer taskId, CourseProhibitDto courseProhibitList);

    boolean delCourseProhibit(Integer taskId, Integer ruleId, Long courseId, String gradeId, String schoolId, String term);
    boolean delCoursdelCourseProhibitBatcheProhibit(Integer taskId, List<BatchCourseRule> rules, String schoolId, String term);

    List<RuleCourse> getAllCourseProhibit(Integer taskId, String keyword);

    void timeProhibitSuit(Integer taskId,List<String> timeCodes);

    List<CourseAndMajor> getAllProhibitCourses(Integer taskId);

    Result importCourseProhibit(HttpServletResponse response, Integer taskId, ImportProhibit importProhibit, MultipartFile file);
    Result importCourseProhibitV2(HttpServletResponse response, Integer taskId, ImportProhibit importProhibit, MultipartFile file) throws Exception;


    List<GradeCourseVo> getAllProhibitCoursesV2(Integer taskId,boolean withRule);

    List<RuleCourseProhibit> getCourseProhibitDetail(Integer taskId, String gradeId, Long courseId);

    boolean setCourseProhibitV2(Integer taskId, String gradeId, Long courseId, CourseProhibitDto courseProhibitList, String schoolId, String term);
}

